#ifndef RESULTS_DOCUMENT_H
#define RESULTS_DOCUMENT_H

#include <QList>
#include <QIcon>
#include <QString>
#include <QDateTime>
#include <QStringList>
#include <QTextDocument>
#include <QTreeWidgetItem>

class ResultsDocument : public QTextDocument
{
    Q_OBJECT

public:
    ResultsDocument(QObject *parent=0);

    // stuff for tree widget item
    inline void setShortTitle( QString msg )    { _treeWidgetItem->setText(0,msg); }
    inline void setToolTip( QString msg )       { _treeWidgetItem->setToolTip( 0,msg ); }
    inline QTreeWidgetItem* getTreeWidgetItem() { return _treeWidgetItem; }

    void appendHeader( QString msg );
    void appendSubHeader( QString msg );
    void appendText( QString msg );
    void appendTable( QList<QStringList> contents, bool colHeader, bool rowHeader );
    void appendList( QStringList list, bool ordered=true );

private:
    QDateTime *_timeStamp;
    QString _content;
    QTreeWidgetItem *_treeWidgetItem;

    void setContent();
};

#endif // RESULTS_DOCUMENT_H
